<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib uri="/struts-tags" prefix="s"%>
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title><s:text name="users"/></title>
	</head>
	
	<body>
		<s:include value="header.jsp"/>
		
		<s:if test="listRoles != null && listRoles.size() > 0">
			
			<s:form action="get_users_by_rol">
	    		<s:select key="roleValue" list="listRoles" />
	    		<s:submit key="get_users"/>
			</s:form>
		<s:else>
			<p><s:text name="no_users"/></p>
		</s:else>
		</s:if>
		
		<s:if test="listUsers != null && listUsers.size() > 0">
			<ul>
				<s:iterator value="listUsers" status="userList">
					<li>
						<s:property value="login"/>
					
						<s:url id="deleteURL" action="delete">
							<s:param name="id" value="id" />
						</s:url> 
						<s:a href="%{deleteURL}">Delete</s:a>
					</li>
				</s:iterator>
			</ul>
		<s:else>
			<p><s:text name="no_users"/></p>
		</s:else>
		</s:if>
		
	</body>
</html>